﻿Imports dooll.Config
Imports dooll.Common
Imports dooll.Gateway

Namespace UI

    Public Class NetPayPage
        Inherits System.Web.UI.Page
        Protected sPayMode As String
        Protected sService As String
        Protected sReturnUrl As String
        Protected sInputCharset As String

        Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            sInputCharset = "UTF-8"
            Response.Charset = "UTF-8"
            sPayMode = Request.QueryString("Mode")
            sService = Request.QueryString("Service")
            sReturnUrl = Request.UrlReferrer.AbsoluteUri
            Select Case LCase(sPayMode)
                Case "alipay"
                    Dim sgateway = NetPayConfig.NetPay.ItemAliPay.GateWayUrl
                    Dim spartner = NetPayConfig.NetPay.ItemAliPay.Partner
                    Dim skey = NetPayConfig.NetPay.ItemAliPay.Key
                    Select Case LCase(sService)
                        Case "return"
                        Case "user_authentication"
                        Case "notify_verify"
                        Case Else
                            Response.End()
                    End Select

                    Dim a = AliPay.CreatUrl(sgateway, sService, spartner, "", "MD5", skey, sReturnUrl, sInputCharset)

                Case Else
                    Response.End()
            End Select
        End Sub
    End Class
End Namespace

